/**
 * Copyright (c) 2014 zhenrongbao.com, Inc. All Rights Reserved
 * @author: jiangshuguang
 * @Date  : 14-11-12
 * @Time  : 上午11:44
 * @brief :
 */
(function () {
    var Digital = require('index:widget/ui/digital/digital.js').Digital,
        $page = $(".index-index");

    $page.find('.demand-block').click(function(){
        location.href="/index/demand";
    });

    $page.find('.term-block').click(function(){
        location.href="/index/term";
    });


    new Digital({
        'container':$page.find(".demand-block .credit"),
        'number': P.data('demand_usable_amount')
    });

    new Digital({
        'container':$page.find(".term-block .credit"),
        'number':P.data('term_usable_amount')
    });
})();